package wwl.lsf.hellospringboot.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import wwl.lsf.hellospringboot.service.MysqlService;

/**
 * @Title
 * @Author wangwenliang
 * @Date 2022/6/15
 * @Description
 */
@RestController
public class MysqlController {

  @Autowired
  private MysqlService mysqlService;

  @RequestMapping("/insert")
  public String testQuery() {
    mysqlService.insert();
    return "insert";
  }

  @RequestMapping("/testMysqlNoTra")
  public String testMysqlNoTra() {
    mysqlService.testQueryNoTransactional();
    return "query";
  }

}
